package com.dianping.cat.home.service.transform;
import com.dianping.cat.home.service.entity.Domain;
import com.dianping.cat.home.service.entity.ServiceReport;
import java.util.ArrayList;
import java.util.List;

public class DefaultLinker implements ILinker {
  private boolean m_deferrable;

  public DefaultLinker(boolean deferrable) {
/* 11 */     this.m_deferedJobs = new ArrayList();


/* 14 */     this.m_deferrable = deferrable;
  }
  private List<Runnable> m_deferedJobs;
  public void finish() {
/* 18 */     for (Runnable job : this.m_deferedJobs) {
/* 19 */       job.run();
    }
  }


  public boolean onDomain(final ServiceReport parent, final Domain domain) {
/* 25 */     if (this.m_deferrable) {
/* 26 */       this.m_deferedJobs.add(new Runnable()
          {
            public void run() {
/* 29 */               parent.addDomain(domain);
            }
          });
    } else {
/* 33 */       parent.addDomain(domain);
    }

/* 36 */     return true;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/service/transform/DefaultLinker.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */